package com.liuceng.zen.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.liuceng.zen.common.annotations.MyBatisRepository;
import com.liuceng.zen.pojo.domain.GdtAdGroup;


/**
 * 广点通广告组
 * 
 * @author Administrator
 *
 */
@MyBatisRepository
public interface GdtAdGroupMapper extends BaseMapper<GdtAdGroup> {

  List<GdtAdGroup> selectByCampaignId(Map<String, Integer> map);

  @Select({
      "select count(1) from public.gdt_ad_groups where member_id = #{memberId} and status= #{status}"})
  int countByMemberId(@Param("memberId") Integer memberId, @Param("status") String status);

  GdtAdGroup selectAdGroupByMemberId(Integer memberId);

  List<GdtAdGroup> findFrontAdGroups(Map<String, Object> params);
}
